package sctu.edu.java.year2016.team02.wanggaowen.Pra;

import java.io.*;

/**
 * Created by 15c on 2016/6/2.
 */
public class Practice {
    public static void main(String[] args) throws IOException {
        File file = new File("E://wanggaowen.java");
        FileOutputStream fileOutputStream= null;
        try {
            fileOutputStream = new FileOutputStream(file);  
            byte[] b="wanggaowen".getBytes();
            fileOutputStream.write(b);
            fileOutputStream.close();
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        }
        try {
            FileInputStream fileInputStream=new FileInputStream(file);
            byte[] bt=new byte[1024];
            int len=fileInputStream.read(bt);
            System.out.print(new String(bt));
            fileInputStream.close();
        } catch (IOException e) {
            e.printStackTrace();
        }


    }


    }
